1. Field of the Invention
The present invention relates to a compound-eye-type ranging device, which is capable of resolving a measurement error caused by a variation with time or a change in temperature and stably measuring a distance from a main body of the ranging device to a ranging target, and to a ranging module having the ranging device. The present invention further relates to an image-capturing device which uses the ranging device or the ranging module.
2. Description of the Related Art
Conventionally, a stereo type (compound-eye-type) ranging device is known in which optical axes of the same ranging optical systems are arranged parallel to each other, images of a subject which is a ranging target obtained from each of the ranging optical systems are compared, displacements (parallax) of the images relative to the same subject are detected, and a distance from a main body of the device to the subject is measured.
FIG. 9 is a schematic side view of a ranging device illustrating a fundamental principle of range measurement by such a stereo camera type ranging device. In such a stereo type ranging device, the distance measurement to a subject is carried out based on a triangulation method.
In FIG. 9, 1 represents a subject, 2 represents a ranging device, A′ represents a distance from the subject 1 to the ranging device 2 (more specially, a distance from the subject 1 to a principal point of a ranging lens described later). The ranging device 2 has a first ranging optical system 3 and a second ranging optical system 4.
In brief, the first ranging optical system 3 has a ranging lens 3A and a ranging image receiving element 3B, the second ranging optical system 4 has a ranging lens 4A and a ranging image receiving element 4B. The first ranging optical system 3 and the second ranging optical system 4 are fixed to a fixed base (stage) 5. Each of the ranging image receiving elements 3B and 4B has a plurality of pixels arranged in a row at a predetermined interval, as illustrated in FIG. 10.
An optical axis O1 of the first ranging optical system 3 and an optical axis O2 of the second ranging optical system 4 are parallel to each other. A distance from the optical axis O1 to the optical axis O2 is called a base length, and the base length is represented by a sign D in FIG. 9.
Here, such a case in which a distance to the subject 1 is measured by means of the ranging device 2, i.e., the subject 1 is imaged by means of the first ranging optical system 3 and the second ranging optical system 4, is considered.
Image-forming luminous flux P1 from the subject 1 passes through the ranging lens 3A of the first ranging optical system 3, and forms an image on an image receiving pixel 3C of the ranging image receiving element 3B. Image-forming luminous flux P2 from the subject 1 passes through the ranging lens 4A of the second ranging optical system 4, and forms an image on an image receiving pixel 4C of the image receiving element 4B. The images formed on the image receiving pixels 3C and 4C are converted into electronic signals, and are output to a ranging computing circuit.
An image receiving position on the image receiving pixel 3C of the ranging image receiving element 3B is different from that on the image receiving pixel 4C of the ranging image receiving element 4B, by parallax of the first ranging optical system 3 and the second ranging optical system 4 to a same point IA of the subject 1. The parallax is generated as a displacement in a direction perpendicular to both the optical axes O1 and O2, in a plane including the optical axes O1 and O2.
Here, when a focal length of each of the ranging lenses 3A and 4A is set to be f, the distance A′ is substantially greater than the focal length of each of the ranging lenses 3A and 4A, i.e., there is a relationship of A′>>f mathematically, if the parallax is set to be Δ, and the following relational expression “Formula 1” is established.A′=D×(f/Δ)  (Formula 1)
Because the base length D, and the focal length f of each of the ranging lenses 3A and 4A are given, when the parallax Δ is known, the distance A′ from the subject 1 to the ranging device 2 can be calculated from the relational expression of the Formula 1.
The parallax Δ is calculated based on positions of the image receiving pixels 3C and 4C, as illustrated in FIG. 10. Circle marks (∘) in FIG. 10 illustrate images of the same point of the subject 1 formed at the positions of the image receiving pixels 3C and 4C. In addition, a circle mark illustrated with a dashed line on the ranging image receiving element 4B virtually illustrates an image of the subject formed on the ranging image receiving element 3B. The parallax Δ is obtained as a sum of a displacement amount ΔY1 in a horizontal direction from a center O of the pixels of the ranging image receiving element 3B to the image receiving pixel 3C, and a displacement amount ΔY2 in a horizontal direction from a center O of the pixels of the ranging image receiving element 4B to the image receiving pixel 4C.
In this way, a method of calculating the distance A′ based on the parallax Δ of the two images is the triangulation method. However, due to various causes of error, it is difficult to obtain the parallax Δ accurately with the triangulation method which uses the two ranging optical systems 3 and 4.
For example, when the optical axis O1 of the ranging lens 3A and the optical axis O2 of the ranging lens 4A are not parallel, an error is included in the parallax Δ. In addition, when the plurality of pixels of the ranging image receiving element 3B or the plurality of pixels of the ranging image receiving element 4B are not lined up on a straight line but inclined, the position of the center O of the pixels of the ranging image receiving element 3B or of the ranging image receiving element 4B shifts, and an error is included in the parallax Δ as well.
Furthermore, the biggest cause of errors is a displacement of the ranging lens 3A (4A) with the ranging image receiving element 3B (4B), i.e., a displacement of the optical axis O1 of the ranging lens 3A (the optical axis O2 of the ranging lens 4A) with the center O of the pixels of the ranging image receiving element 3B (the center O of the pixels of the ranging image receiving element 413).
The reason is that, when the ranging lens 3A (the ranging lens 4A) shifts, the optical axis O1 (the optical axis O2) shifts by only the same amount as the shift amount of the ranging lens 3A (the ranging lens 4A); therefore, when the ranging image receiving element 3B (the ranging image receiving element 4B) is assumed to be at a fixed position, the shift amount of the ranging lens 3A (4A) directly appears as the error of the parallax Δ.
The reality is that it is quite difficult to remove these causes of error completely. Moreover, it is insufficient to only remove the causes of error temporarily, and it is necessary to remove the causes of error such as variations with time and changes in the ambient temperature which are long-term environmental variations.
For example, JP 3090078 B discloses a technology by which ranging can be carried out with high accuracy without being influenced by a change in the ambient temperature. When plastic lenses are used for the ranging lenses 3A and 4A, to reduce the cost of the ranging device 2, the plastic expands by a change in temperature, the base length D and the positions of the ranging lenses 3A and 4A change, and a ranging error increases. Therefore, a technology to countermeasure this is disclosed in JP 3090078 B, in which, even if the ranging lenses 3A and 4A expand by the change in temperature, an interval between the optical axis O1 and the optical axis O2, i.e., the base length D does not change.
In addition, JP 4226936 B discloses a correction method in which a ranging error generated by a change in the ambient temperature is corrected by a temperature sensor, and a ranging error to a rapid change in temperature is corrected by using a timer. The reason for performing the correction with use of the timer is that it can not respond to the rapid change in temperature by just the correction with only the temperature sensor.
However, in the technology disclosed in JP 3090078 B, the number of parts increases because of a structure of a ranging lens being pressed by a plate spring. Moreover, it is necessary to adjust each of the ranging lenses 3A and 4A, therefore, the assembly process is more complex, and the cost of manufacturing increases.
On the other hand, in the technology disclosed in JP 4226936 B, a change in the base length D by a temperature expansion of the ranging lens is corrected with the temperature sensor, and the timer is used in combination with the temperature sensor, because the change in the base length D can not be corrected completely by just the temperature sensor. The sensor and the timer, as well as a control circuit which controls the sensor are necessary when performing the correction with the sensor and the timer, and as in the technology disclosed in JP 3090078 B, the number of parts increases, and the component cost and the cost of manufacturing increase.
In general, the ranging image receiving elements 3B and 4B are made of a silicon-based material, and an expansion due to a rise in temperature is small. On the other hand, the ranging lenses 3A and 4A are produced with a plastic material which expands greatly due to the rise in temperature. An error due to the change in temperature is caused by the expansion of the plastic material due to the rise in temperature.
Therefore, great displacements of the ranging lenses 3A, 4A with the ranging image receiving elements 3B and 4B respectively are generated. For example, the base length D between the optical axis O1 of the ranging lens 3A and the optical axis O2 of the ranging lens 4A is 5 mm, the distance A′ from the center of the ranging lenses 3A and 4A to the subject 1 is 5 m, and if the focal length f of the ranging lenses 3A and 4A is set to be 5 mm, according to the Formula 1, the parallax Δ isΔ=D·f/A′=5 μm  (Formula 2)
That is, in the ranging device 2, when there is a parallax Δ of 5 μm, the distance A′ is recognized to be 5 m.
On the other hand, if the linear coefficient of expansion α of a plastic lens is 6×10−5, when the change in temperature Δt is 10 degrees Celsius, a displacement of the base length D is,D×α×Δt=3 μm  (Formula 3)
This is equal to the parallax increasing 3 μm. As a result, when the change in temperature is 10 degrees Celsius, even if measuring a distance of the same distance 5 m, a great ranging error of 60% (=3 μm/5 μm) will be generated.